<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang='en'>
<head>
	<title>blog-log-content</title>
	<link rel='stylesheet' type='text/css' media='screen' href='/static/css/default.css'>
</head>
<body>

<div class='Top'>
	<div class='TopMain'>
		<h3>Welcome to my blog</h3>
			<div class='Margins'>
			{% if error %}
				<p class='niche'>Did not find a relevant article or you enter a null character.</p>
			{% endif %}
				<form action = '/query/' method = 'get'>
				<input type='text' name='query'>
				<input type="submit" value='Search'>
				</form>
			</div>
		<div id='Navigation'>
			<a href='accounts/login'>登入</a>
			<a href='accounts/logout'>注销</a>	
		</div>
	</div>
</div>
<!--top end-->
<div id='Main'>	

	<div class='lef'>
		<div id='rigth'>
			<div class='cation'>
				关于我
				<hr>
				<form action="/about-me/" method="post"  enctype="multipart/form-data">
				<div>
					{% if images %}
					<div><img src='static/userpop/{{ images }}' width="200px" height="150px" align=''></div>
					<a href='/delete_images/'>删除图片</a>
					<input type="file" name="images" value="更换图片">
					{% else %}
					<div>您还没有头像，<input type="file" name="image" value="上传图片"></div>
					{% endif %}
				</div>
					<input type="submit" value="保存" name="submit">
				</form>
			</div>

			<div class='cation'>	
				分类列表
				<hr>
				{% if judgment %}
				<form action = '/add/' method = 'get'>
					<input type="submit" value='添加分类'>
					<input type='text' name='add'>
				</form>
				{% endif %}

				{% for i in classification %}
					<a href = '/classification/{{i.id}}/' class='green'>{{i.type}}</a></br>
					{% for j in i.artcle reversed%}
					<span>
						<a href="log_content/{{j.id}}" class='node'>{{ j.title }}</a>
					</span>
					{% endfor %}
					</br>
				{% endfor %}
			</div>
			
			<div class='cation'>
				标签列表
				<hr>
				{% for i in contact_list %}
				<a href='log_content/{{i.id}}' class='green' style='font-size:{{size}} pt;'>{{ i.label }}</a>
				{% endfor %}
			</div>

		</div>
		<div class='over'>
			<div id='log'>
				<div class='content'>
					<img class='normal' src='/static/material/book.jpg'>
					<a href='/' class='title'>{{adict.article.title}}</a>
					<hr>
						<div class='post_info'>
						Posted in |<a herf='classification/{{l.id}}/'>{{ l.log_foreign.type }} </a>|
						发表日期:{{l.date}}</div>
						<span class='log_content'>
							<p class='add'>{{adict.article.content}}</p>
						</span>
					
							<span class='created'>
								{% if judgment %}
								<a href='/delete/{{l.id}}/{{b}}'>删除日志|</a>
								<a href='/editor/{{l.id}}/'>编辑日志|</a> 
								{% endif %}
						<hr>
							<div class='tags'>Tags</div>
								<a href='/classification/{{l.id}}/' class='min'>{{ l.log_foreign.type }}</a>
								<a href='/' class='min'>{{ l.label }}</a>
							</span>

				</div>
			</div>					

				<hr>
				{% if adict.comments %}
			<div id='log2'>
				{% for i in adict.comments %}
				<div>
						<br>Nickname: {{i.nickname}}
					<hr>
						<p>Content: {{i.comment}}</p>
				</div>
				
				<span class='created'>
					{% if judgment %}
					<a href='/delete_comment/{{i.id}}'>删除|</a>
					{% endif %}
					<a href='/reply/{{i.id}}'>回复|</a>
					评论日期: {{i.date}}
					<hr>
				</span>

							{% for j in i.replys %}
								<p style="padding-left:20px;color:#666;"><br>Nicke:{{ j.reply_to_nickname }}
									<br>Reply:{{ j.reply_to_comment }}
									<br>Date{{ j.date }}
									</p>
							{% endfor %}
				{% endfor %}
			</ol>
			</div>
			{% else %}
			<b> Rely </b>
			{% endif %}
				<hr>
			<div id='log'>
				<div>
					<form method='POST' id='commentform'>
							<p><input type='text' name='nickname'> 昵称（必填）</p>
							<p><input type='text' name='porfile'> 邮箱（必填，不公开）</p>
							<p><input type='text' name='email'> 个人网页</p>
						
						<div class='locate'>
							<p><textarea name='content' id='comment' rows='100%' tabindex='2'></textarea></p>
							<button type="submit">提交评论</button></br>
						</div>
					<form>
				</div>
		<form action='/'>
			<input type='button' value='返回'>
		</form>
			</div>
		</div>
	</div>
</div>
</body>
</html>